const mongoose = require("mongoose")
const schema = new mongoose.Schema({
  email: { type: String, unique: true },
  password: { type: String, required: true },
  nick: { type: String, default: "dilili", maxlength: 14 },
  sex: { type: Number, default: 0 },
  headUrl: {
    type: String,
    default: "http://localhost:3000/upload/res/avatar/icon.jpg",
  },
  sign: { type: String, default: "懒得写", maxlength: 40 },
  fansCount: { type: Number, default: 0 },
  collectList: [{ type: mongoose.Types.ObjectId, ref: "Video" }],
  attentionList: [{ type: mongoose.Types.ObjectId, ref: "User" }],
})
module.exports = mongoose.model("User", schema)
